package com.helloniu.view {

import com.helloniu.fl.util.Tool;
import com.helloniu.model.UserListModel;
import com.helloniu.controller.UserListController;
	
public class TestView1 implements ViewInterface {
	public function TestView1(str:String = null) {
		this.name =  str;
	}

	private var oldInfo:Array = new Array();
	
	public function updateModel():void {
		Tool.traceT("===update==: " + name);
		
		var model:UserListModel = UserListController.getIns().getModel() as UserListModel;
		var newInfo:Array = model.getUsers();
		
		// users does not chnage
		if(Tool.compareUsersArray(oldInfo, newInfo)) {
			return;
		}

		oldInfo = Tool.arrayCopy(newInfo);
		
		populate();
	}

	private function populate():void {
		//oldInfo
	} 
	
	private var name:String;
}
}